/*************************************************
 * File:    		SMJS_function.cpp
 * Author:  	HouJiong <hou_jiong@163.com>
 * Brief:   		StoneMoneky project.
 *
 * Copyright (c) HouJiong
 *
 *************************************************/

/*
 * History:
 * =======================================
 * 2009-04-10 HouJiong <hou_jiong@163.com> created
 */
 
#ifndef _SMJS_FUNCTION_H_
#define _SMJS_FUNCTION_H_

#include <jsapi.h>
#include "SMtypedef.h"

static JSBool print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) 
{ 

	DEBUG_LINE();
	JSString *str = JS_ValueToString(cx, *argv);	
	std::string name = JS_GetStringBytes(str);	

	std::cout<<name<<std::endl;
	return JS_TRUE;
}



#endif//_SMJS_FUNCTION_H_

